﻿#region Usings
using Microsoft.Xna.Framework;
#endregion

namespace ghrb.Camera
{
    /// <summary>
    /// Camera at the highway
    /// </summary>
    class CameraHighway
    {
        #region Public Functions
        public CameraHighway(float aspectRatio)
        {
            //Create projection matrix
            m_matProjection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),
                                                                  aspectRatio,
                                                                  1.0f,
                                                                  20000.0f);

            //Create view matrix
            m_matView = Matrix.CreateLookAt(m_vPosition, m_vTarget, Vector3.Up);
        }
        #endregion

        #region Properties and Vars
        /// <summary>
        /// Position
        /// </summary>
        private Vector3 m_vPosition = new Vector3(0.0f, 100.0f, -50.0f);

        /// <summary>
        /// Target
        /// </summary>
        private Vector3 m_vTarget = new Vector3(0.0f, 0.0f, 100.0f);

        /// <summary>
        /// View Matrix
        /// </summary>
        public Matrix View
        {
            get { return m_matView; }
        }
        private Matrix m_matView = Matrix.Identity;

        /// <summary>
        /// Projection Matrix
        /// </summary>
        public Matrix Projection
        {
            get { return m_matProjection; }
        }
        private Matrix m_matProjection = Matrix.Identity;

        #endregion
    }
}
